home *** CD-ROM | disk | FTP | other *** search
/ Hottest 6 / Hottest 6 (1996)(PDSoft)[!].iso / software / fredfish / 1076.lha / Programs / Man / Install < prev    next >
Text File  |  1995-03-29  |  4KB  |  144 lines

  1. ;  *** Man installation scipt ***
  2.  
  3. (set #install-msg
  4. (cat "\n\nMan installation script.\n"
  5.      "This script installs the MAN commodity on your Amiga.\n\n"
  6.      "Read the documentation for\n"
  7.      "more information on the distribution\n"
  8.      "and commercial usage of Man.\n\n"
  9.      "Man © 1993-1995 Markus Hillenbrand\n"
  10.      "All rights reserved."
  11. ))
  12.  
  13. (set #bad-kick         "You must be using Kickstart 2.04 to install using this script!")
  14. (set #copying-reqtools "Copying reqtools.library to Libs:...")
  15.  
  16. (message #install-msg)
  17. (welcome "Welcome to the Man installation!")
  18.  
  19. (if (< (/ (getversion) 65536) 37)
  20. (
  21.     (abort #bad-kick)
  22. ))    
  23.  
  24. (if (exists "S:Man.cfg")
  25. (
  26.     (delete "S:Man.cfg")
  27. ))
  28.  
  29. (set reqtoolslib "libs20/reqtools.library")
  30. (set catalogdir  "catalogs/")
  31.  
  32. (copylib
  33.         (prompt "\n" #copying-reqtools)
  34.         (help @copylib-help)
  35.         (source reqtoolslib)
  36.         (dest "Libs:")
  37.         (confirm)
  38.  
  39. (if (exists "SYS:WBStartUp/Man") (copylib   (prompt "\nInstalling Man-Commodity\n")
  40.                                   (help @copylib-help)
  41.                          (source "Man")
  42.                              (dest "SYS:WBStartUp")
  43.                              (confirm))
  44.                  (copyfiles (prompt "\nInstalling Man-Commodity\n")
  45.                                             (help @copyfile-help)
  46.                                             (source "MAN")
  47.                                             (dest "SYS:WBStartUp")
  48.                                             (infos)
  49.                                             (noposition)
  50.                                             (confirm))
  51. )
  52.  
  53. (set #which-language "\nWhich languages should be installed?\n(English is default.)") 
  54. (set old_level @user-level)
  55. (set default_lang 1)
  56.  
  57. (if (exists "SYS:Locale")
  58. (
  59.     (if (exists "LOCALE:")
  60.         (
  61.         (user 1)
  62.         (set lang (askoptions (prompt #which-language)
  63.                               (help   #which-language-help)
  64.                               (choices    "Deutsch"
  65.                                           "Svenska")
  66.                               (default default_lang)
  67.                   )
  68.         )
  69.         (user old_level)
  70.         (set n 0)
  71.         (while (set language (select n "deutsch"
  72.                                        "svenska"
  73.                                        ""))
  74.            (
  75.            (if (IN lang n)
  76.                (
  77.                (if (<> 2 n)
  78.                    (
  79.                    (makedir (cat "LOCALE:Catalogs/" language))
  80.                    (copyfiles (source (cat catalogdir language))
  81.                               (dest (cat "LOCALE:Catalogs/" language))
  82.                               (all)
  83.                    )
  84.                ))
  85.               ))
  86.            (set n (+ n 1))
  87.         ))
  88.      ))
  89. ))
  90.  
  91. (set #which-manpages "\nWhich man pages should be installed?") 
  92. (set #which-manhelp  "Specify the useful man pages")
  93. (set old_level @user-level)
  94. (set manpagedir "Pages/")
  95.  
  96. (
  97.    ;get destination dir for ManPages
  98.    (set mydest
  99.         (askdir
  100.                (prompt "Select the directory where you want to put the man pages:")
  101.                (help   "The directory where you store the man pages should be on a "
  102.                        "hard drive. A directory will NOT be created!!\n\n"
  103.                )
  104.                (default "Work:")
  105.                (disk)
  106.         )
  107.    )
  108.  
  109.    (user 1)
  110.    (set lang (askoptions (prompt #which-manpages)
  111.                          (help          #which-manhelp)
  112.                          (choices  "Man"
  113.                                    "Dir"
  114.                                    "DT2IFF"
  115.                                    "List"
  116.                                    "Which"
  117.                                    "Why")
  118.              )
  119.         )
  120.         (user old_level)
  121.         (set n 0)
  122.         (while (set manpage (select n "Man.man"
  123.                                       "Dir.man"
  124.                                       "DT2IFF.man"
  125.                                       "List.man"
  126.                                       "Which.man"
  127.                                       "Why.man"
  128.                                       ""))
  129.         (
  130.         (if (IN lang n)
  131.             (
  132.             (if (<> 200 n)
  133.                 (
  134.                 (copyfiles (source (cat manpagedir manpage))
  135.                            (dest mydest)
  136.                            (all)
  137.                            )
  138.                 ))
  139.             ))
  140.         (set n (+ n 1))
  141.     ))
  142. )
  143.